package com.zjt.controller;

import com.zjt.bean.Admin;
import com.zjt.bean.AdminReq;
import com.zjt.bean.BaseReq;
import com.zjt.bean.BaseRespVo;
import com.zjt.bean.data.BaseData;
import com.zjt.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/admin")
public class AdminController {

    @Autowired
    AdminService adminService;

    @RequestMapping("list")
    public BaseRespVo list(AdminReq baseReq) {//*
        BaseData<Admin> adminBaseData = adminService.query(baseReq);
        return BaseRespVo.ok(adminBaseData);
    }
}
